<?php

class Soul_Validation_Rule_MinLength extends Soul_Validation_Rule_Base {

	private $_length = NULL;

    public function  __construct($length = NULL){
        parent::__construct();
        $this->_length = $length;
    }

    public function getLength(){
    	return $this->_length;
    }
    public function setLength($value){
    	$this->_length = $value;
    }

    public function getType(){
        return 'minLength';
    }

    public function check($value) {
        return strlen($value) >= $this->getMin();
    }
}